--module(...,package.seeall)

local function topEdit(config)
  return {
    CardView;
    layout_width="fill";
    --backgroundColor=背景颜色;
    --radius="8dp";
    --radius=0;
    id=config.cardId or "topCard";
    elevation=工具栏阴影;
    background=MyStyle.topCard();
    --background=ButtonFrame(nil,nil,nil,背景颜色,{0,0,0,0,math.dp2int(16),math.dp2int(16),math.dp2int(16),math.dp2int(16)});
    {
      LinearLayout;
      layout_width="fill";
      layout_marginLeft="16dp";
      layout_marginRight="16dp";
      layout_margin="8dp";
      Focusable=true;
      FocusableInTouchMode=true;
      {
        EditText;
        inputType="text";
        lines=1;
        id=config.EditId or "topEditText";
        Hint=config.editHint or "请输入";
        imeOptions=config.imeOptions or "actionSearch";
        layout_weight="1";
        layout_marginRight="16dp";
      };
      MyButton({
        text=config.searchText or "搜索";
        layout_width="56dp";
        id=config.ButtonId or "topButton";
        style="accent";
      });

    };
  };
end
--topEdit
return topEdit